
//封装wx请求
export default function requset(url, data, method = "get") {
  return new Promise((resolve, reject) => {
    wx.request({
      url: "http://localhost:3000" + url,
      data,
      method,
      success: (res) => {
         resolve(res.data)
      },
      fail: (e) => {
         reject(e)
      }
    })
  })
}